package com.ruoyi.qsng.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.uuid.SnowFlakeUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qsng.mapper.KClearinghouseLikeMapper;
import com.ruoyi.qsng.domain.KClearinghouseLike;
import com.ruoyi.qsng.service.IKClearinghouseLikeService;

/**
 * 交流中心_点赞Service业务层处理
 * 
 * @author kanglou
 * @date 2023-06-07
 */
@Service
public class KClearinghouseLikeServiceImpl implements IKClearinghouseLikeService 
{
    @Autowired
    private KClearinghouseLikeMapper kClearinghouseLikeMapper;

    /**
     * 查询交流中心_点赞
     * 
     * @param id 交流中心_点赞主键
     * @return 交流中心_点赞
     */
    @Override
    public KClearinghouseLike selectKClearinghouseLikeById(String id)
    {
        return kClearinghouseLikeMapper.selectKClearinghouseLikeById(id);
    }

    /**
     * 查询交流中心_点赞列表
     * 
     * @param kClearinghouseLike 交流中心_点赞
     * @return 交流中心_点赞
     */
    @Override
    public List<KClearinghouseLike> selectKClearinghouseLikeList(KClearinghouseLike kClearinghouseLike)
    {
        return kClearinghouseLikeMapper.selectKClearinghouseLikeList(kClearinghouseLike);
    }

    /**
     * 新增交流中心_点赞
     * 
     * @param kClearinghouseLike 交流中心_点赞
     * @return 结果
     */
    @Override
    public int insertKClearinghouseLike(KClearinghouseLike kClearinghouseLike)
    {
        kClearinghouseLike.setId(SnowFlakeUtil.getNextId());
        kClearinghouseLike.setCreateTime(DateUtils.getNowDate());
        return kClearinghouseLikeMapper.insertKClearinghouseLike(kClearinghouseLike);
    }

    /**
     * 修改交流中心_点赞
     * 
     * @param kClearinghouseLike 交流中心_点赞
     * @return 结果
     */
    @Override
    public int updateKClearinghouseLike(KClearinghouseLike kClearinghouseLike)
    {
        kClearinghouseLike.setUpdateTime(DateUtils.getNowDate());
        return kClearinghouseLikeMapper.updateKClearinghouseLike(kClearinghouseLike);
    }

    /**
     * 批量删除交流中心_点赞
     * 
     * @param ids 需要删除的交流中心_点赞主键
     * @return 结果
     */
    @Override
    public int deleteKClearinghouseLikeByIds(String[] ids)
    {
        return kClearinghouseLikeMapper.deleteKClearinghouseLikeByIds(ids);
    }

    /**
     * 删除交流中心_点赞信息
     * 
     * @param id 交流中心_点赞主键
     * @return 结果
     */
    @Override
    public int deleteKClearinghouseLikeById(String id)
    {
        return kClearinghouseLikeMapper.deleteKClearinghouseLikeById(id);
    }
}
